@layout("/common/_container.html"){
<div class="row">
    <div class="col-sm-12">
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h5>结账管理</h5>
            </div>
            <div style="display: none">
                <input type="hidden" id="oneChannelValue" value="">
                <input type="hidden" id="twoChannelValue" value="">
                <input type="hidden" id="thrChannelValue" value="">
                <input type="hidden" id="customerStatus" value="">
            </div>
            <div class="ibox-content">
                <div class="row row-lg">
                    <div class="col-sm-12">
                        <div class="col-sm-10">
                            <ul class="ul_li clearfix">
                                <li>
                                    <label>一级渠道</label>
                                    <select id="oneChannel" name="oneChannel" class="selectBox"
                                            onchange="Recharge.inquire()" >

                                    </select>
                                </li>
                                <li>
                                    <label>二级渠道</label>
                                    <select id="twoChannel" name="twoChannel" class="selectBox"
                                            onchange="Recharge.inquire()">
                                    </select>
                                </li>
                                <li>
                                    <label>三级渠道</label>
                                    <select id="thrChannel" name="thrChannel" class="selectBox"
                                            onchange="Recharge.inquire()">
                                    </select>
                                </li>
                                <li>
                                    <label>状态</label>
                                    <select id="dealStatus" name="dealStatus" class="selectBox"
                                            onchange="Recharge.inquire()">
                                        <option value="">请选择</option>
                                        <option value="已开单">已开单</option>
                                        <option value="已成交">已成交</option>
                                    </select>
                                </li>
                            </ul>
                        </div>
                        <div class="col-sm-2">
                            <div style="width: 288px;height: 39px;border: 1px solid #cccccc;border-radius: 3px">
                                <span class="glyphicon glyphicon-search" style="padding: 7px 0px 0px 10px;"></span>
                                <input type="text" id="reach" placeholder="姓名/电话/微信/单据号"
                                       onchange="Recharge.inquire()" style="width: 238px;height: 35px;border: none;float: right;outline:none;margin-top: 1px">
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-12" style="margin-top: 20px;">
                        <div class="col-sm-4">
                            <label style="width: 80px;display: inline-block;">结账时间</label>
                            <input type="text" id="startTime" class="selectBox" style="border: 1px solid #999999;width: 190px;"
                                   onclick="laydate({istiem:true,format:'YYYY-MM-DD hh:mm:ss'})">
                            <span>-</span>
                            <input type="text" id="endTime" class="selectBox" style="border: 1px solid #999999;width: 190px;"
                                   onclick="laydate({istiem:true,format:'YYYY-MM-DD hh:mm:ss'})">
                        </div>
                        <div class="col-sm-8 clearfix">
                            <div class="btn_box" style="float: right">
                                <button type="button" class="btn" onclick="Recharge.recharge()">结账</button>
                                <button type="button" class="btn" onclick="Recharge.delete()">删除</button>
                                <button type="button" class="btn" onclick="Recharge.updateTime()">修改时间</button>
                                <button type="button" class="btn" onclick="Recharge.updateDocumentNumber()">修改单号</button>
                                <button type="button" class="btn" onclick="Recharge.resetSearch()">重置</button>
                                <button type="button" class="btn" onclick="Recharge.print()">打印</button>
                                @if(shiro.hasPermission("/recharge/uploadDealInfo")){
                                <button type="button" class="btn" onclick="Recharge.uploadDealInfo()">导入开单明细</button>
                                <button type="button" class="btn" onclick="Recharge.uploadArrears()">导入欠费明细</button>
                                <button type="button" class="btn" onclick="Recharge.uploadMedicalNumber()">导入病历号</button>
                                @}
                            </div>
                        </div>
                    </div>
                    <div class="col-sm-12" style="background:#3b97d3;;line-height: 46px;margin-top: 19px">
                        <ul class="records clearfix bigSize">
                            <li onclick="Recharge.totalNumber()">
                                总人数：<span style="color: #ff8a00" id="total">0</span>
                                金额：<span style="color: #ff8a00"><span id="totalMoney">0</span>元</span>
                            </li>
                            <li onclick="Recharge.newCustomsData()">
                                新客首次：<span style="color: #03feb7" id="first">0</span>
                                金额：<span style="color: #03feb7"><span id="firstMoney">0</span>元</span>
                            </li>
                            <li onclick="Recharge.newSecondary()">
                                新客二次：<span style="color: red" id="secondary">0</span>
                                金额：<span style="color: red"><span id="secondaryMoney">0</span>元</span>
                            </li>
                            <li onclick="Recharge.newOldGuest()">
                                老客：<span style="color: #fff701" id="oldGuest">0</span>
                                金额：<span style="color: #fff701"><span id="oldGuestMoney">0</span>元</span>
                            </li>
                            <li onclick="Recharge.newRevisit()">
                                复诊：<span style="color: #ff00e0" id="revisit">0</span>
                                金额：<span style="color: #ff00e0"><span id="revisitMoney">0</span>元</span>
                            </li>
                        </ul>
                    </div>
                    <#table id="RechargeTable"/>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="${ctxPath}/static/modular/arrival/customer/recharge.js"></script>
<script src="${ctxPath}/static/js/common/jsChannel.js"></script>
<script>
    var oneChanneli = document.getElementById("oneChannelValue").value;
    var twoChanneli = document.getElementById("twoChannelValue").value;
    var thrChanneli = document.getElementById("thrChannelValue").value;
    $.post(Feng.ctxPath + "/channel/getChannelsss", function (data) {
        ChannelList = data;
        channelInit('oneChannel', 'twoChannel', 'thrChannel');
    }, "json");
</script>
@}
<style>
    ul{  padding: 0; margin: 0; }
    .selectBox {  width: 170px;  height: 39px;  border-radius: 5px;  padding-left: 5px;  }
    .ul_li>li{  float: left; margin-right: 3%  }
    .ul_li label{  display: inline-block;  width: 80px;  }
    .records>li{  float: left;  margin-right: 30px;  }
    .records>li{  color: white;  cursor:pointer;  }
    .records>li>span{  font-weight: bolder;  }
    .bigSize {  font-size: 1.2em;  }
    .btn_box button {  margin: 0;  color: white;  background: #2eadd0;  padding: 7px 30px;  font-size: 1em;  }
</style>